# -*- coding: utf-8 -*-
# File : user.py
# Author: taoyahui
# Date : 2021/10/17

from config import db


class User(db.Model):
    __tablename__ = 'cbp_user'
    username = db.Column(db.String, primary_key=True)
    password = db.Column(db.String)
    nickname = db.Column(db.String)
    account_address = db.Column(db.String)
    role = db.Column(db.Integer)
    bank_address = db.Column(db.String)

    def __init__(self, username, password, nickname, account_address, role, bank_address):
        self.username = username
        self.password = password
        self.nickname = nickname
        self.account_address = account_address
        self.role = role
        self.bank_address = bank_address
